<template>
	<view class="center">
		<u-navbar title="登录"></u-navbar>
		<view class="content">
			<view class="logotop">
				<image :src="imgBaseUrl + '/ache/images/userlogo.png'" class="img"></image>
				<view class="title">欢迎登录龙池百疼堂</view>
			</view>
			<!-- 账号密码登录  -->
			<view class="logo-item">
				<view class="userinput "><input class="useracc" :adjust-position="false" v-model="useraccount" placeholder="请输入会员号" type="text" /></view>
				<view class="userinput" v-if="showPassword"><input class="userPW" :adjust-position="false" v-model="userpassword" placeholder="请输入密码" type="password" /></view>
				<view class="userinput" v-if="!showPassword"><input class="userPW" :adjust-position="false" v-model="userpassword" placeholder="请输入密码" type="text" /></view>
				<view class="logo-icon"><u-icon :name="showPassword ? 'eye-off' : 'eye'" @click="inputIconchange"></u-icon></view>
				<view class="Remember">
					<u-checkbox-group>
						<u-checkbox v-model="checked" shape="circle" active-color="red" @change="checkboxChange"><view class="Remember-text">记住密码</view></u-checkbox>
					</u-checkbox-group>
				</view>
			</view>
			<!-- 登录按钮啊 -->
			<view class="button-bottom">
				<view class="button"><u-button type="error" shape="circle">登录</u-button></view>
				<view class="logo-bottom">
					<view class="tabs-bottom">新用户注册</view>
					<view class="tabs-bottom">忘记密码</view>
					<view class="tabs-bottom">账号密码登录</view>
				</view>
			</view>
			<!-- 底部的 登录方式 -->
			<view class="bottom">
				<view class="title"><text class="text">其它登录方式</text></view>
				<view class="allbottom">
					<image :src="imgBaseUrl + '/ache/images/people.png'" class="img"></image>
					<image :src="imgBaseUrl + '/ache/images/phone.png'" class="img"></image>
					<image :src="imgBaseUrl + '/ache/images/watch.png'" class="img"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { mapGetters } from 'vuex';
export default {
	data() {
		return {
			showPassword: true, //密码是否显示
			userpassword: '', //密码
			useraccount: '', //账号
			passwordIcon: true,
			checked: false //是否记住密码   false 否 true是
		};
	},

	computed: {
		...mapGetters(['imgBaseUrl'])
	},
	methods: {
		checkboxChange() {
			console.log(this.checked, '修改是否记住密码');
		},
		// 点击密码框消小眼睛
		inputIconchange() {
			this.showPassword = !this.showPassword;
		}
	}
};
</script>
<style lang="scss">
@import '@/styles/mixin.scss';
.center {
	min-height: 100%;
	background-color: #ffffff;
	.content {
		.logotop {
			padding-top: 100rpx;
			text-align: center;
			.img {
				width: 200rpx;
				height: 67rpx;
			}
			.title {
				padding-top: 40rpx;
				font-size: 32rpx;
				font-weight: bold;
				color: #222222;
			}
		}
		.logo-item {
			.userinput {
				text-align: center;
				padding: 40rpx;
				.useracc {
					border-radius: 46rpx;
					height: 91rpx;
					background-color: #f2f2f2;
				}
				.userPW {
					border-radius: 46rpx;
					height: 91rpx;
					background-color: #f2f2f2;
				}
			}
			.logo-icon {
				position: fixed;
				z-index: 999;
				top: 675rpx;
				right: 60rpx;
				transform: translateX(-50%);
			}
			.Remember {
				padding-left: 30rpx;
				.Remember-text {
					font-size: 22rpx;
					font-weight: 400;
					color: #888888;
				}
			}
		}
		.button-bottom {
			.button {
				margin-top: 40rpx;
				padding: 20rpx;
			}
			.logo-bottom {
				display: flex;
				flex-direction: row;
				justify-content: space-around;
				.tabs-bottom {
					padding: 20rpx;
					font-size: 22rpx;
					font-weight: 400;
					color: #888888;
				}
			}
		}

		.bottom {
			width: 100%;
			position: fixed;
			bottom: 60rpx;
			.title {
				width: 100%;
				text-align: center;
				.text {
					margin: 20rpx;
					font-weight: bold;
					font-size: 22rpx;
					color: #cccccc;
				}
			}
			.allbottom {
				padding-top: 50rpx;
				display: flex;
				flex-direction: row;
				justify-content: space-around;
				.img {
					width: 66rpx;
					height: 66rpx;
				}
			}
		}
	}
}
</style>
